package com.mybatisflex.demo.listener;

import com.mybatisflex.annotation.InsertListener;
import com.mybatisflex.annotation.UpdateListener;
import lombok.extern.slf4j.Slf4j;

/**
 * @author 王帅
 * @since 2023-07-18
 */
@Slf4j
public class LoggerListener implements InsertListener, UpdateListener {

    @Override
    public void onInsert(Object entity) {
        log.info("插入数据：{}", entity);
    }

    @Override
    public void onUpdate(Object entity) {
        log.info("更新数据：{}", entity);
    }

}